Pyspark
Run Ipython Notebook
$ Pyspark_driver_python=ipython pyspark_driver_python_opts= "notebook" Pyspark[terminalipythonapp] WARNING | Subcommand ' Ipython notebook ' is deprecated and'll be removed in the future versions. [Terminalipythonapp] WARNING | Likely want to use ' Jupyter notebook ' in the Future[i 14:21:56.030 Notebookapp] Jupyterlab Beta preview extension load Ed From/opt/local/anaconda/lib/python3.6/site-packages/jupyter
This article describes the basic usage of iPython and notevook.
1 install Ipython
Pip install ipython2 Basic Notebooke usage
Start ipython and use ipython
Start notebook to use ipython notebook3 remote use of Ipython notebook configuration method 3.0 create remote service
Syntax: ipython profile create
E.g .:
Ipython profile create myserver
In this case, the cursor will output the location of the generated file. remember this location.3.1 configure openssl authentication
Openssl req-x509-node
Jupyter Notebook Quick Start [go], jupyternotebook
Jupyter Notebook (formerly known as IPython notebook) is an interactive Notebook that supports running more than 40 programming languages. In this article, we will introduce the main features of Jupyter notebook and why it is a powerful tool for people who want to write beautiful interactive documents.
Before using notebook, We need to install the Library first. You can find the complete steps on the Jupyter official website.
Note: As longpip in
:5df252f58b7f: Bf65d53125bb36c085162b3780377f66d73972d1 ' #填写刚刚生成的密文 c.notebookapp.open_browser = False # prevents notebook from automatically opening the browser at startup ( In Linux servers are generally SSH command line access, there is no graphical interface. So, start-up is also not what to use) C.notebookapp.port =8889 #指定访问的端口, the default is 8888.
4. Start Jupyter Notebook
[Root@346086094cbe/]# jupyter notebook--allow-root
[W 17:17:04.106 Notebo
information.
IPython 5.4.1--an enhanced Interactive Python.
? ->introduction and overview of IPython ' s features.
%quickref-> Quick Reference.
Help->python ' s own Help system.
Object? ->details about ' object ', use ' object?? ' for extra Details.
In [1]: from Notebook.authimport passwd
In [2]: passwd ()
Enter password:111111
Verify password:111111
OUT[2]: ' sha1:7a79f215c9f0:5a2fb1e4a1043557c903a2854bf34125a8f62092 '
In [3]: 3. Modifying a configuration file
vi/root/.jupyter/jupyter_note
: 8d628fff7b12: 274eca57...
Copy the generated ciphertext
6. Modify the default configuration file
Vim path/jupyter_notebook_config.py
Or (py2)
Vim path/ipython_notebook_config.py
Make the following changes:
C. NotebookApp. ip = '*'
C. NotebookApp. password = 'sha: ce... The ciphertext copied just now'
C. NotebookApp. open_browser = False
C.
CTRL-C to abort the installation
-Or Specify a different location below
[/user/zhangsan/anaconda3]>>>
Anaconda The default installation path is/user/zhangsan/anconda3/, and of course you can specify the installation directory yourself, and enter it here.
Open a new terminal after Setup completes
#jupyter Notebookwill start and automatically open http://localhost:8888/tree# in the browser
[I 17:37:52.287 Notebookapp] Serving notebooks from local
# Jupyter notebook--certfile=mycert.pem--keyfile Mykey.key
jupyter Notebook--certfile=/home/zhenyu/.jupyter/secret/mycert.pem
# output, look at the last line, this time Jupyter Notebook can accept any IP access.
[I 12:55:05.929 Notebookapp] [nb_conda_kernels] enabled, 2 kernels found
[W 12:55:05.960 Notebookapp] Warning:the notebook server is listening to all IP addresses and not using encryption. This is
Ipython notebook is run by default in http://localhost:8888/, only native access target: Running Ipython notebook on the server, accessing in the local browser
Server operating system CENTOS7, development environment Python 2.7 Local Mac OS
1. Install $ pip Install Ipython[notebook]
$ Ipython Notebook
If the error "Importerror:no module named Notebookapp", then $ pip install Jupyter
Bug under virtual env My Python development environment is virt
, and enter Y to agree and install the package.
Download of some packages is slow. You can enable lantern first.
Use and configuration of jupyter notebook
Enter jupyter notebook in Ubuntu.
Jupyter notebook -- generate-config can generate the default configuration file jupyter_notebook_config.py
Default Address Configuration
Modify the configuration file c. NotebookApp. notebook_dir = 'xxxx'
Remote Access
Remote Access is disabled by default.
First gen
Anaconda comes with notebook, which is essentially a web application. Its purpose is to clean up and convert data, visualize data, machine learning, and support real-time code.
1. Modify the default working directory
1. Enter jupyter-Notebook -- generate-config In the CMD window.
Obtain the path of the notebook configuration file.
2. Open the configuration file (enter the path and press Enter)
3. Find C. notebookapp. notebook_dir.
Remove the note # an
Install Jupyter notebook******
The first step: Install the Ipython, after the installation completes enters Ipython, the following figure, enters exit may exitPip Install Ipython
Step Two: Install JupyterPip Install Jupyter
Step Three: Configure the environment to access Jupyter notebook remotely
1, Jupyter notebook--generate-config
If you receive the following prompts, add –allow-root after the previous commandJupyter Notebook–generate-config–allow-root
[C 09:07:26.948
;easy_install.exe PYZMQ
2) Download and install JINJA2,
C:>easy_install.exe JINJA2
3) Download and install tornado,
C:>easy_install.exe tornado
Well, use the following command to get the notebook up:
C:>ipython3.exe Notebook
Note: If importerror:no module named Notebook.notebookapp appears during installation, please see http://stackoverflow.com/questions/ 31401890/importerror-no-module-named-notebook-notebookapp
3. Try the scientific calculation of
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.